//
//  GameData.m
//  cocos2dt1
//
//  Created by mmac on 1/20/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "GameData.h"


@implementation GameData

//
// singleton stuff
//
static GameData *_sharedObject = nil;

+ (GameData *)sharedObject {
	@synchronized([GameData class])
	{
		if (!_sharedObject) {
			[[self alloc] init];
		}
		
		return _sharedObject;
	}
	// to avoid compiler warning
	return nil;
}

+(id)alloc
{
	@synchronized([GameData class])
	{
		// NSAssert(_sharedDirector == nil, @"Attempted to allocate a second instance of a singleton.");
		_sharedObject = [super alloc];
		return _sharedObject;
	}
	// to avoid compiler warning
	return nil;
}

- (int) getLevel {
	if(level < 1){
		level = 1;
	}
	return level;
}
- (void) setLevel:(int)lvl {
	level = lvl;
}

@end
